package com.cf.chat.util;
import java.io.Closeable;
import java.io.IOException;
/**
 * @Auther: chenf
 * @Date: 2020/07/28/15:19
 * @Description:传入的流对象如果非空就将其关闭
 */
public class CloseUtil {
    public static void closeAll(Closeable... able) {
        for (Closeable c : able) {
            if (c != null) {
                try {
                    c.close();
                }catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
